home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
kermit.columbia.edu
/
kermit.columbia.edu.tar
/
kermit.columbia.edu
/
newsgroups
/
misc.20021006-20030409
/
000126_fdc@columbia.edu_Mon Dec 2 16:43:07 EST 2002.msg
< prev
next >
Wrap
Text File
|
2003-04-08
|
5KB
|
137 lines
Article: 13907 of comp.protocols.kermit.misc
Path: newsmaster.cc.columbia.edu!news.columbia.edu!news-not-for-mail
From: fdc@columbia.edu (Frank da Cruz)
Newsgroups: comp.protocols.kermit.misc,comp.unix.aix
Subject: Re: Using C-KERMIT to ftp on a PPP dail-up connection
Date: 2 Dec 2002 16:42:08 -0500
Organization: Columbia University
Lines: 120
Message-ID: <asgk3g$608$1@watsol.cc.columbia.edu>
References: <684be77d.0212021211.49438037@posting.google.com>
NNTP-Posting-Host: watsol.cc.columbia.edu
X-Trace: newsmaster.cc.columbia.edu 1038865329 15030 128.59.39.139 (2 Dec 2002 21:42:10 GMT)
X-Complaints-To: postmaster@columbia.edu
NNTP-Posting-Date: 2 Dec 2002 21:42:10 GMT
Xref: newsmaster.cc.columbia.edu comp.protocols.kermit.misc:13907 comp.unix.aix:243596
In article <684be77d.0212021211.49438037@posting.google.com>,
John Haines <jhaines@benplan.com> wrote:
: I have been reading the C-KERMIT 8.0 reference and the FAQ, but still
: having trouble putting the whole picture together.
:
: I have been using C-KERMIT on AIX for about a year. I need to
: transfer a file to another company. They provide access to their FTP
: server via PPP dial-up. I am wondering can I use C-KERMIT to dail the
: number, redirect to PPP, and then transfer the file using kermit
: commands, and close the connection.
:
As you have seen in the FAQ, this is indeed a frequently asked question,
but the best answer is: we don't necessarily recommend it because whether
and exactly this works depends on many varying factors. If you can figure
it out if it's even possible, and if so how to do it, on a particular
platform with a particular PPP client and a particular modem on a particular
kind of port, good! For us to explain how to do it given a particular
combination of all those factors that we are probably not familiar with is
a stretch.
: In the examples from the C-KERMIT
: documentation, I noticed they redirect to the pppd daemon, but in AIX
: I could only find the pppattachd command to invoke the ppp daemon.
: Any help would be appreciated, because at this point I'm not sure what
: is possible and what is not possible.
:
Nor are we in this case. I'm copying the AIX newsgroup in case somebody
there has done this. However, I'm sure most people would advise to you
make the PPP connection in the normal way for your platform, and then use
Kermit as a regular FTP client.
For example, if AIX has a command to start PPP, just have Kermit run that
command. Or if AIX automatically makes the PPP connection when any
application tries to make a TCP/IP connection (as happens on Windows),
maybe your script can simply skip the whole PPP business.
: I would prefer to accomplish
: the whole task using C-KERMIT, but don't know if it is possible. Any
: assistance would be appreciated. Thanks in advance for the
: enlightenment!
:
: Below is the script that I have developed thus far.
:
: #!/usr/opt/ckermit/ckermit +
: set telnet echo remote
: set host 10.44.16.3 7001
:
You should have IF FAIL after commands like this (i.e. commands that
subsequent commands depend on to succeed).
: set modem type generic
: set dial hangup off
: set exit on-disconnect on
: set ftp AUTOAUTHENTICATION ON
: set ftp AUTOLOGIN ON
: set ftp VERBOSE ON
: set ftp DEBUG ON
:
: ; Setup modem pool information
: .telephone = 9,1-210-226-3232
: define modem_userid user
: define modem_passwd userpasswd
:
: assign \%u \m(modem_userid)
: assign \%p \m(modem_passwd)
:
: ; Logon to the modem pool
: lineout
: sleep 1
: lineout
: promptwait \m(wait_time) Username:
: if fail faterr 1 "ERROR: Can't login to the modem pool. "
: lineout \%u
:
: promptwait \m(wait_time) Password:
: if fail faterr 1 "ERROR: Can't login to the modem pool. "
: lineout \%p ; Send password
: undef \%p ; Clear password from memory
:
: ; Dail customer number
: dial \m(telephone)
:
Here you need another IF FAIL clause in case the call is not answered.
: ; Once connected redirect connection to PPP on AIX
: exec /redirect /usr/sbin/pppattachd demand
:
I think the problem here is that once you've issued the EXEC command,
Kermit is gone, replaced by pppattachd. Therefore the rest of the
script will not be executed.
Unix was simply not designed to let an application attach your computer to
the TCP/IP network by dialing, and then use it as a client (or server).
Maybe you can do something like this:
run /usr/sbin/pppattachd demand < \v(ttyfd) > \v(ttyfd) &
if fail exit 1 FATAL: pppattachd start failure
pause
instead of EXEC, to allow the subseqent commands to be executed, but you'll
have to figure out the details based on how pppattachd works (I have no
idea) and how to be sure the connection is ready to go.
: ; Connect to remote customer IP Address
:
: ftp open ftp.mycustomer.com 21 /user:kuser /password:passwd
: if fail exit 1 Connection failed: \v(ftp_message)
:
: if not \v(ftp_loggedin) exit 1 Login failed
:
: ftp dir
:
: ftp put /binary benplan.ini
: if fail exit 1 ftp PUT benplan.ini : \v(ftp_message)
:
: ftp bye
: exit
- Frank